-- Equipment
-- Create by panyl
-- 装备对象

Equipment = {
    classId = 0,
    owner = "",
};
Equipment.__index = Equipment;

-- 构造函数
function Equipment.new(classId, owner)
    local self = {};
    setmetatable(self, Item);
    self.classId = classId;
    self.owner = owner;

    return self;
end

-- 取得该对象的描述字符串
function Equipment:get_ob_id()
    return string.format("Equipment:%s:%s", tostring(self.classId), tostring(self.owner));   
end

-- 装备数据
function Equipment:query(path)
    if (path == "class_id") then return self.classId;
    elseif (path == "owner") then return self.owner;
    else
        return EquipM.query(self.classId, path);
    end
end